package com20230214;

import java.util.Scanner;

public class Method {
    public static void main(String[] args) {


        double s1 = getScore("喜羊羊","《语文》");
        double s4 = getScore("喜羊羊","《数学》");
        double s7 = getScore("喜羊羊","《英语》");
        double s2 = getScore("美羊羊","《语文》");
        double s5 = getScore("美羊羊","《数学》");
        double s8 = getScore("美羊羊","《英语》");
        double s3 = getScore("懒羊羊","《语文》");
        double s6 = getScore("懒羊羊","《数学》");
        double s9 = getScore("懒羊羊","《英语》");
        //System.out.println(s1+s4+s7+","+s2+s5+s8+","+s3+s6+s9);

//        String []name = new String[3];
//        String []course = new String[]{
//                "语文","数学","英语"
//        };
//
//        for (int i = 0; i < 3; i++) {
//
//                Scanner sc = new Scanner(System.in);
//                System.out.println("请输入姓名：");
//                name[i] = sc.next();
//
//            for (int j = 0; j < course.length; j++) {
//                getScore(name[i],course[j]);
//            }
//
//        }

    }


    static double getScore(String name,String subject ){
        Scanner sc = new Scanner(System.in);
        System.out.println("请输入学生" + name + "的" + subject +"成绩：");
        double score = sc.nextDouble();
        System.out.println(name + "的" + subject+ "成绩是" + score + "分");

        return score;

    }



}
